<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../../css/swiper.css">
    <title>Document</title>
    <style>
        .swiper-container{
            width: 400px;
            height: 200px;
            border: 1px solid #000;
        }
    
    
    </style>
    <script src="../../js/vue.js"></script>
    <script src="../../js/swiper.js"></script>
</head>

<body>
    <div id="app">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide" v-for="item in arr">{{item}}</div>

            </div>
        </div>
    </div>
    <script>
        new Vue({
            el: "#app",
            data: {
                arr: []
            },
            mounted() {
                setTimeout(() => {
                    this.arr = ["111", "222", "333"];
                    this.$nextTick(() => {
                        var mySwiper = new Swiper('.swiper-container', {
                            autoplay: 1000, //可选选项，自动滑动
                        })
                    })
                },1000)
            },
            methods: {

            }
        })
    </script>
</body>

</html>